package com.jwdf.uda.http.action;

import android.content.Context;

import com.jwdf.uda.bean.PbBean;
import com.jwdf.uda.http.AHttpService;
import com.jwdf.uda.http.ApiService;

import retrofit2.Call;

/**
 * 类说明：搭配指导
 * 作者：huangqiuxin on 2016/6/6 10:02
 * 邮箱：648859026@qq.com
 */
public class GuideGetGuideListAction extends AHttpService<PbBean.PbResGuideGetDesignerGuideList>{

    public static GuideGetGuideListAction newInstance(Context context, PbBean.PbSignGuideListFilterType type, int offset){
        return new GuideGetGuideListAction(context, type, offset);
    }

    private PbBean.PbSignGuideListFilterType type;
    private int offset;
    public GuideGetGuideListAction(Context context, PbBean.PbSignGuideListFilterType type, int offset) {
        super(context);
        this.type = type;
        this.offset = offset;
    }

    @Override
    protected Call newRetrofitCall(ApiService apiService, PbBean.PbBaseClientInfo.Builder baseBuilder) {
        PbBean.PbReqGuideGetDesignerGuideList.Builder builder = PbBean.PbReqGuideGetDesignerGuideList.newBuilder();
        builder.setBaseClientInfo(baseBuilder);
        builder.setOffset(offset);
        builder.setType(type);
        return apiService.getDesingerGuideList(builder.build());
    }
}
